const defaultConfigArr = [
  {
    id: 1,
    type: 'text', // 元素类型
    fieldType: "FormField",
    name: '文本框', // label 描述
    icon: 'swm-lane', // 图标
    code: '', // 元素编码
    defaultValue: '', // 默认值
    required: false, // 是否必填
    readOnly: false,
    placeholder: '请输入', // 提示
    params: {},
    layout: null,
  },
  {
    id: 2,
    type: 'multi-line-text',
    fieldType: "FormField",
    name: '多行文本框',
    icon: 'swm-lane',
    code: '', // 元素编码
    defaultValue: '', // 默认值
    required: false,
    readOnly: false,
    placeholder: '请输入',
    params: {},
  },
  {
    id: 5,
    type: 'dropdown',
    fieldType: "OptionFormField",
    name: '下拉列表框',
    icon: 'combo-box',
    code: '', // 元素编码
    defaultValue: undefined, // 默认值
    required: false,
    readOnly: false,
    placeholder: '请选择',
    options: [
      {
        key: 'options1',
        id: 'options1',
        name: "选项 1",
      },
    ],
  },
  {
    id: 3,
    type: 'integer', // 数字  decimal 小数
    fieldType: "FormField",
    name: '数字文本框',
    icon: 'text-number',
    code: '', // 元素编码
    defaultValue: '', // 默认值
    required: false,
    readOnly: false,
    placeholder: '请输入',
    params: {},
  },
  {
    id: 6,
    type: 'boolean',
    fieldType: "FormField",
    name: '复选按钮',
    icon: 'check-square-o',
    code: '', // 元素编码
    defaultValue: [], // 默认值
    required: false,
    readOnly: false,
    placeholder: null,
    options: [
      {
        key: 'options1',
        id: 'options1',
        name: "选项 1",
      },
    ],
  },
  {
    id: 4,
    type: 'radio-buttons',
    fieldType: "OptionFormField",
    name: '单选按钮',
    icon: 'pitch-on',
    code: '', // 元素编码
    defaultValue: null, // 默认值
    required: false,
    readOnly: false,
    placeholder: null,
    options: [
      {
        key: 'options1',
        id: 'options1',
        name: "选项 1",
      },
    ],
  },
  {
    id: 8,
    type: 'date',
    fieldType: "FormField",
    name: '日期选择器',
    icon: 'calendar',
    code: '', // 元素编码
    defaultValue: '', // 默认值
    required: false,
    readOnly: false,
    placeholder: '请选择',
    params: {},
  },
  {
    id: 10,
    type: 'userRadio',
    fieldType: "FormField",
    name: '人员单选框',
    icon: 'user-add',
    code: '', // 元素编码
    defaultValue: '', // 默认值
    required: false,
    readOnly: false,
    placeholder: null,
    params: {},
  },
  {
    id: 11,
    type: 'functional-group',
    fieldType: "FormField",
    name: '人员多选框',
    icon: 'usergroup-add',
    code: '', // 元素编码
    defaultValue: '', // 默认值
    required: false,
    readOnly: false,
    placeholder: null,
    params: {},
  },
  {
    id: 12,
    type: 'upload',
    fieldType: "FormField",
    name: '文件上传',
    icon: 'cloud-upload-o',
    code: '', // 元素编码
    defaultValue: [], // 默认值
    required: false,
    readOnly: false,
    placeholder: null,
    params: {
      multiple: true,
    },
  },
];

const typeNameObj = {};

defaultConfigArr.forEach(ele=>{
  const {type,name} = ele;
  typeNameObj[type] = name;
});

export {
  defaultConfigArr,
  typeNameObj,
};